var booktop = echarts.init(document.getElementById('book_top'));
//var option1 = {
//            title: {
//                text: '书籍销量top10'
//            },
//            tooltip: {},
//            legend: {
//                data:['top10']
//            },
//            xAxis: {
//                data: [],
//                axisLabel: { interval: 0, rotate: 45 }
//            },
//            yAxis: {},
//            series: [{
//                name: '书籍销量top10',
//                type: 'bar',
//                data: []
//            }]
//        };
//
var option1={
title: {
                text:'书籍销量top10'
            },
  xAxis: {
    type: 'category',
    data: [],
    inverse: false,
    animationDuration: 300,
    animationDurationUpdate: 300,
    axisLabel: { interval: 0, rotate: 45 },
    max: 9 // only the largest 3 bars will be displayed
  },
    toolbox: {
    show: true,
    feature: {
      dataView: { show: true, readOnly: false },
      magicType: { show: true, type: ['line', 'bar'] },
      restore: { show: true },
      saveAsImage: { show: true }
    }
  },
  calculable: true,
  yAxis: {
  max: 'dataMax'
  },
  series: [
    {
      realtimeSort: true,
      name: 'top10',
      type: 'bar',
      data: [],
      label: {
        show: true,
        position: 'right',
        valueAnimation: true
      }
    }
  ],
  legend: {
    show: true
  },
  animationDuration: 0,
  animationDurationUpdate: 1000,
  animationEasing: 'linear',
  animationEasingUpdate: 'linear'
};
booktop.setOption(option1);